package org.lex.string;

import java.io.PrintWriter;
import java.io.StringWriter;

public class DefaultPrinter<T> extends AbstractPrinter<T> implements IFormatter<T> {

	@Override
	public String format(T object) {
		StringWriter sw = new StringWriter();
		PrintWriter pw = new PrintWriter(sw);
		format(object, pw);
		pw.flush();
		return sw.toString();
	}
}
